﻿using System;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace G.WeiBo.ViewModel
{


    public class SettingViewModel : BaseViewModel
    {
        private static ThemeType themeName;
        public ThemeType ThemeName
        {
            get
            {

                if (System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings.Contains("ThemeName"))
                {
                    themeName = (ThemeType)System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings["ThemeName"];
                }
                else
                {
                    themeName = ThemeType.Black;
                    System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings["ThemeName"] = themeName;
                    System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings.Save();
                }

                return themeName;
            }
            set
            {
                themeName = value;
                System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings["ThemeName"] = themeName;
                System.IO.IsolatedStorage.IsolatedStorageSettings.ApplicationSettings.Save();
            }
        }

    }
}
